# File: Perfil.py
"""\
Classe abstrata com os dados comuns aos profissionais e empresas.

"""
# Copyright (c) 2005 by TcheZope.org
# Generator: ArchGenXML Version 1.4 devel 4 http://sf.net/projects/archetypes/
#
# GNU General Public Licence (GPL)
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#
__author__  = '''Fabiano Weimar dos Santos <xiru@xiru.org>, Jean Rodrigo Ferri
<jeanrodrigoferri@yahoogroups.com>, Rafahela Bazzanella
<rafabazzanella@yahoo.com.br>'''
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *




from Products.PloneZopista.config import *
##code-section module-header #fill in your manual code here
##/code-section module-header

schema= Schema((
    StringField('id',
        widget=IdWidget
        (
            visible={'view':'hidden','edit':'hidden'},
            label='Id',
            label_msgid='PloneZopista_label_id',
            description='Enter a value for id.',
            description_msgid='PloneZopista_help_id',
            i18n_domain='PloneZopista',
        ),
    ),
    
    StringField('title',
        widget=StringWidget(
            description="Informe o nome completo.",
            label="Nome",
            label_msgid='PloneZopista_label_title',
            description_msgid='PloneZopista_help_title',
            i18n_domain='PloneZopista',
        ),
        required=1,
        accessor="Title",
        searchable=1,
    ),
    
    TextField('description',
        widget=TextAreaWidget(
            label="Observacoes",
            description="Informe uma breve descricao sobre o perfil.",
            label_msgid='PloneZopista_label_description',
            description_msgid='PloneZopista_help_description',
            i18n_domain='PloneZopista',
        ),
        required=1,
        accessor="Description",
        searchable=1,
    ),
    
    StringField('email',
        widget=StringWidget(
            description="Informe seu endereco de e-mail para contato.",
            label="E-Mail",
            label_msgid='PloneZopista_label_email',
            description_msgid='PloneZopista_help_email',
            i18n_domain='PloneZopista',
        ),
        required=1,
        validators=('isEmail',),
    ),
    
    StringField('website',
        widget=StringWidget(
            description="Informe o endereco de seu sitio da web.",
            label='Website',
            label_msgid='PloneZopista_label_website',
            description_msgid='PloneZopista_help_website',
            i18n_domain='PloneZopista',
        ),
        validators=('isURL',),
    ),
    
    StringField('telefone',
        widget=StringWidget(
            description="Informe seu telefone para contato.",
            label='Telefone',
            label_msgid='PloneZopista_label_telefone',
            description_msgid='PloneZopista_help_telefone',
            i18n_domain='PloneZopista',
        ),
    ),
    
    StringField('rua',
        widget=StringWidget(
            description="Informe o logradouro em que voce reside.",
            label='Rua',
            label_msgid='PloneZopista_label_rua',
            description_msgid='PloneZopista_help_rua',
            i18n_domain='PloneZopista',
        ),
        required=1,
    ),
    
    StringField('bairro',
        widget=StringWidget(
            description="Informe o bairro em que voce reside.",
            label='Bairro',
            label_msgid='PloneZopista_label_bairro',
            description_msgid='PloneZopista_help_bairro',
            i18n_domain='PloneZopista',
        ),
        required=1,
    ),
    
    StringField('cidade',
        index="FieldIndex",
        widget=StringWidget(
            description="Informe o nome da cidade em que voce reside.",
            label='Cidade',
            label_msgid='PloneZopista_label_cidade',
            description_msgid='PloneZopista_help_cidade',
            i18n_domain='PloneZopista',
        ),
        required=1,
    ),
    
    StringField('cep',
        widget=StringWidget(
            description="Informe o Codigo de Enderecamento Postal em que voce reside.",
            label='Cep',
            label_msgid='PloneZopista_label_cep',
            description_msgid='PloneZopista_help_cep',
            i18n_domain='PloneZopista',
        ),
    ),
    
    StringField('estado',
        index="FieldIndex",
        widget=SelectionWidget
        (
            format="select",
            description="Informe o Estado em que voce reside.",
            label='Estado',
            label_msgid='PloneZopista_label_estado',
            description_msgid='PloneZopista_help_estado',
            i18n_domain='PloneZopista',
        ),
        enforceVocabulary=1,
        vocabulary=VOCAB_ESTADOS,
        required=1,
    ),
    
    StringField('pais',
        widget=StringWidget(
            description="Informe o pais em que voce reside.",
            label='Pais',
            label_msgid='PloneZopista_label_pais',
            description_msgid='PloneZopista_help_pais',
            i18n_domain='PloneZopista',
        ),
        required=1,
    ),
    
    TextField('contribuicoes',
        widget=TextAreaWidget(
            description="Informe as contribuicoes efetuadas para a comunidade Python/Zope/Plone.",
            rows=10,
            label='Contribuicoes',
            label_msgid='PloneZopista_label_contribuicoes',
            description_msgid='PloneZopista_help_contribuicoes',
            i18n_domain='PloneZopista',
        ),
        searchable=1,
    ),
    
),
)


##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Perfil(BaseContent):
    """
    Classe abstrata com os dados comuns aos profissionais e
    empresas.
    """
    security = ClassSecurityInfo()
    __implements__ = (getattr(BaseContent,'__implements__',()),)


    allowed_content_types      = [] 
    schema = schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header


    #Methods
# end of class Perfil

##code-section module-footer #fill in your manual code here
##/code-section module-footer



